package com.bbzn.device.client.dao.opthis;

import com.bbzn.device.client.dataobject.OptHis;
import java.util.Date;
import java.util.List;

import groovy.transform.ToString;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.mongodb.core.mapping.Document;

public interface OptHisMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(OptHis record);

    int insertOrUpdate(OptHis record);

    int insertOrUpdateSelective(OptHis record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(OptHis record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    OptHis selectByPrimaryKey(Long id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(OptHis record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(OptHis record);

    List<OptHis> findByAll(OptHis optHis);

    int deleteByImei(@Param("imei") String imei);

    int updateBatch(List<OptHis> list);

    int updateBatchSelective(List<OptHis> list);

    int batchInsert(@Param("list") List<OptHis> list);
}